<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Admin/webroot/css/style.css"/>
<link rel="stylesheet" type="text/css" href="Admin/webroot/css/jquery-ui.css"/>
<title>添加文章</title>
</head>
<script type="text/javascript" src="Admin/webroot/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="Admin/webroot/js/jquery-ui.js"></script>
<script type="text/javascript" src="Admin/webroot/js/global.js"></script>
<script type="text/javascript" src="Admin/webroot/js/input.js"></script>
<script>
$(function(){
	
	$('#created').datepicker({
          dateFormat:'yy-mm-dd'//日期格式
          });
	})

</script>
<!--[if IE ]>
<style>.localUpload{ display:none}.pro .ke-inline-block{ display:block} </style>
<![endif]-->
<body >
<!--[if lte IE 6]>
<script src="js/DD_belatedPNG_0.0.8a.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
	DD_belatedPNG.fix('.pngfix');
</script>
<![endif]-->
<div class="rightbox">
    	<div class="rightbox-col" id="rightbox">
        	<div class="main">
                 {include file='../Common/main_title.html'}
                <div class="bd">
                	<div class="height_20"></div>
                    <div class="add-pro-info">
                       
                            <div class="pro-info">
                            	<div id="pro">
                                    <div class="left-table"><span class="red">*</span>标题：</div>
                                    <div class="right-table"><input type="text" name="title" value="{$art.title}" placeholder="请输入标题"/></div>
                                    <div class="msg"></div>
                                    <div class="height_10"></div>
                                    {if $_CFG.DIGLOSSIA==1}
                                    <div class="left-table"><span class="red">*</span>英文标题：</div>
                                    <div class="right-table"><input type="text" name="en_title" value="{$art.en_title}" placeholder="请输入标题"/></div>
                                    <div class="msg"></div>
                                    <div class="height_10"></div>
                                    {/if}
                                    <div class="left-table">作者：</div>
                                    <div class="right-table"><input type="text" name="author" value="{$art.author}"/></div>
                                    <div class="msg">
                                        
                                    </div>
                                   
                                    <div class="height_10"></div>
                                     {if $_CFG.DIGLOSSIA==1}
                                      <div class="left-table">作者英文名：</div>
                                    <div class="right-table"><input type="text" name="en_author" value="{$art.en_author}"/></div>
                                    <div class="msg">
                                        
                                    </div>
                                   
                                    <div class="height_10"></div>
                                     {/if}
                                </div>
                            </div>
                            <div class="height_20"></div>
                            <div class="pro">
                            	<div class="hd next-hd">
                                	<span class="icon-c"></span>
                                    SEO信息
                                    <div class="clear"></div>
                                </div>
                                <div class="bd" style="display:none">
                                	<table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">页面标题</td>
                                        <td width="434px"><input type="text" name="page_title" value="{$art.page_title}"/></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">页面关键词：</td>
                                        <td width="434px"><textarea class="keywords" name="keywords">{$art.keywords}</textarea></td>
                                        <td valign="top"></td>
                                    </tr>
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">页面摘要：</td>
                                        <td width="434px"><textarea class="keywords" name="abstract">{$art.abstract}</textarea></td>
                                        <td></td>
                                    </tr>
                                    
                                </table>
                                </div>
                            </div>
                            <div class="height_20"></div>
                            <div class="pro">
                            	<div class="hd next-hd">
                                	<span class="icon-c" ></span>
                                    扩展信息
                                     <div class="clear"></div>
                                </div>
                                <div class="bd next-hd">
                                	<table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">分类栏目：</td>
                                        <td width="434px">
                                        	<div class="s-select-c" style="z-index:1;">
                                        		<input disabled="disabled" type="text" autocomplete="off" name="parent_name" {if $art.cat_name}value="{$art.cat_name}"{else}value="请选择所属栏目"{/if} class="s-select"/>
                                                <div class="s-select-menu"  style="z-index:1">
                                                	<ul>
          {foreach from=$parent_list item=list}                                          	<li data-select="{$list.id}"><a href="#">{$list.name}</a></li>
                                                        {/foreach}                                                </ul>
                                                </div>
                                                <input type="hidden" class="fmenu" name="cat_id" value="{$art.cat_id|default:0}" />
                                            </div>
                                            
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">缩略图</td>
                                        <td width="434px"><input type="text" id="img_url" disabled="disabled" name="thumb_url" value="{$art.thumb}" id="thumb"/></td>
                                        <td>
                                        	<a href="javascript:;"   class="localUpload" onclick="$(this).next().children('form').children('.ke-upload-file').click()">本地上传</a>
                   <input id="uploadButton_" return_url="img_url" type="button" value="submit" />                        
                                           
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">点击次数：</td>
                                        <td width="434px"><input type="text" name="hits" value="{$art.hits}"/></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">发布日期：</td>
                                        <td width="434px"><input id="created" type="text" name="created" value="{$art.created|date_format:'%Y-%m-%d'}"/></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">来源名称：</td>
                                        <td width="434px"><input type="text" name="source" value="{$art.source}"/></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td width="85px" style="padding-right:7px" align="right">来源链接：</td>
                                        <td width="434px"><input type="text" name="source_url" value="{$art.source_url}"/></td>
                                        <td></td>
                                    </tr>
                                    
                                </table>
                                </div>
                            </div>
                            <div class="height_20"></div>
                            <div class="pro">
                            	<div class="hd next-hd">
                                	<span class="icon-c" ></span>
                                    文章正文
                                     <div class="clear"></div>
                                </div>
                                <div class="bd">
                                	<textarea name="content" class="pro-view" id="pro-view" style="width:680px; height:348px;">{$art.content}</textarea>
                                </div>
                            </div>
                            <div class="height_20"></div>
                             {if $_CFG.DIGLOSSIA==1}
                            <div class="pro">
                            	<div class="hd next-hd">
                                	<span class="icon-c" ></span>
                                    英文正文
                                     <div class="clear"></div>
                                </div>
                                <div class="bd">
                                	<textarea name="en_content" class="pro-view" id="pro-view" style="width:680px; height:348px;">{$art.en_content}</textarea>
                                </div>
                            </div>
                            <div class="height_20"></div>
                            {/if}
                            <input type="hidden" name="cat_id" value="{$cat_id}" />
                            <input type="hidden" name="id" value="{$id}" />
                          <input type="button" class="pro-add-sub submit_btn" value="保存"/>
                            <div class="height_24"></div>
                       
                    </div>
                </div>
            </div>
        </div>
         
        <div class="clear"></div>
    </div>
<script type="text/javascript" src="Admin/webroot/js/editor/kindeditor.js"></script>
<script type="text/javascript" src="Admin/webroot/js/kindeditor_upload.js">
</script>
<script type="text/javascript">
    $(function(){
		hungry_uploadimg('index.php?g=admin&m=article&a=file');	
		$('.pro-add-sub').click(function(){
			
			
			
			var action = '{$action}';
			var cat_id=($('input[name=cat_id]').val());
			var id=($('input[name=id]').val());
			var title=($('input[name=title]').val());
			var en_title=($('input[name=en_title]').val());
			var abstract=($('textarea[name=abstract]').val());
			var keywords=($('textarea[name=keywords]').val());
			var author=($('input[name=author]').val());
			var en_author=($('input[name=en_author]').val());
			var source=($('input[name=source]').val());
			var hits=($('input[name=hits]').val());
			var source_url=($('input[name=source_url]').val());
			var content=$('textarea[name=content]').val();
			var en_content=$('textarea[name=en_content]').val();
			var created=($('input[name=created]').val());
			var page_title=($('input[name=page_title]').val());
			var thumb=($('input[name=thumb_url]').val());
			$.post('index.php?g=admin&m=article&a='+action,{ id:id,content:content,cat_id:cat_id,title:title,abstract:abstract,created:created,keywords:keywords,author:author,source:source,hits:hits,page_title:page_title,source_url:source_url,thumb:thumb,en_title:en_title,en_author:en_author,en_content:en_content},function(result){
				///console.log(result);
				showMsg(result.content,result.url);
		
				},'json');
			})
		
		});
	
</script>
<script type="text/javascript">
$(".next-hd").click(function(){
	var html=$(this).find("span").attr("class");
	if(html=='icon-c'){
		$(this).next(".bd").show();
		$(this).find("span").attr('class','focus');
		
	}else{
		$(this).next(".bd").hide();
		$(this).find("span").attr('class','icon-c');
	}
})


</script>
</body>
</html>
